<!DOCTYPE html>
<html>
  
  <head>
    {include file="common/meta" /}
  </head>
  
  <body class="layui-anim layui-anim-up">
    <div class="x-body">
        <!-- 搜索 -->
      <div class="layui-row">
        <form method="get" class="layui-form layui-col-md12 x-so">
          <input class="layui-input" placeholder="开始日" name="start" id="start" value="" />

          <input class="layui-input" placeholder="截止日" name="end" id="end" value="" />

          <input type="text" name="keywords"  placeholder="请输入昵称或邮箱" autocomplete="off" value="" class="layui-input">
          
          <button class="layui-btn">
              <i class="layui-icon">&#xe615;</i>
          </button>
        </form>
        <xblock>
            (更多详情请前往查看详情)
            <span class="x-right" style="line-height:40px;margin-top: -1em;">共有数据：{$count} 条</span>
        </xblock>
      </div>

      <!-- 分页列表 -->
      <table class="layui-table">
        <thead>
          <tr>
            <th>商品订单号</th>
            <th>购买用户</th>
            <th>配送单号</th>
            <th>下单时间</th>
            <th>订单状态</th>
            <th>操作</th></tr>
        </thead>
        <tbody>
            {foreach $orderlist as $item}
            <tr>
                <td>{$item.code}</td>
                {if condition="$item.users"}
                    <td>{$item.users.nickname}</td>
                {else /}
                    <td>该用户已注销</td>
                {/if}

                {if condition="$item.expcode"}
                    <td>{$item.expcode}</td>
                {else /}
                    <td>暂无配送单号</td>
                {/if}
                <td>{$item.createtime}</td>
                <td>{$item.status_text}</td>
                <td class="td-manage">
                    {if condition="$item.status < 2"}
                        <a title="去发货" class="layui-btn layui-btn-sm layui-btn-normal" href="{:url('admin/order.order/delivery',['orderid'=>$item.id])}">
                            发货
                        </a>
                    {/if}

                    <a  class="layui-btn layui-btn-sm layui-btn-warm" title="订单详情" href="javascript:;" onClick="x_admin_show('订单详情',`{:url('admin/order.order/info',['orderid'=>$item.id])}`)">
                        查看详情
                    </a>
                </td>
            </tr>
            {/foreach}
        </tbody>
      </table>

      <!-- 分页 -->
      <div class="page">
        {$pagestr}
      </div>
    </div>
  </body>
</html>